export function callCloud(name, data) {
  return new Promise((resolve, reject) => {
    uniCloud.callFunction({
      name,
      data,
    }).then((res) => {
      resolve(res.result);
    }).catch((err) => {
      reject(err);
    });
  });
}